import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
// manage main-table's data by table store
import table from './modules/table'
// edit and add form components vali~
import unit from './modules/unit'
// default router permission control
import permission from './modules/permission'
// dynamic router permission control (Experimental)
// import permission from './modules/async-router'
import getters from './getters'

Vue.use(Vuex)

export default new Vuex.Store({
  
  /**
   * 使用 modules 进行拆分, 本级 store不进行状态管理 
   * 
   * 
   */
  modules: {
    app,
    user,
    permission,
    table,
    unit
  },
  
  state: {

  },
  
  mutations: {

  },
  
  actions: {

  },
  
  getters
})
